/*
 * @Author: error: git config user.name && git config user.email & please set dead value or install git
 * @Date: 2022-08-22 15:55:08
 * @LastEditors: error: git config user.name && git config user.email & please set dead value or install git
 * @LastEditTime: 2022-08-22 16:03:32
 * @FilePath: \ruoyi-ui\src\api\wechat\user.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

// 查询用户列表
export function listUser(query) {
    return request({
        url: '/wechat/wxUser/page',
        method: 'get',
        params: query
    })
}

// 查询用户详细
export function getUser(openid) {
    return request({
        url: '/wechat/wxUser/' + openid,
        method: 'get'
    })
}

// 新增用户
export function addUser(data) {
    return request({
        url: '/wechat/user',
        method: 'post',
        data: data
    })
}

// 修改用户
export function updateUser(data) {
    return request({
        url: '/wechat/wxUser',
        method: 'put',
        data: data
    })
}

// 修改用户备注
export function updateRemark(data) {
    return request({
        url: '/wechat/wxUser/remark',
        method: 'put',
        data: data
    })
}
// 打标签
export function tagging(data) {
    return request({
        url: '/wechat/wxUser/tagid-list',
        method: 'put',
        data: data
    })
}
// 删除用户
export function delUser(openid) {
    return request({
        url: '/system/user/' + openid,
        method: 'delete'
    })
}

//微信用户同步
export function synchroWxUser(appid) {
    return request({
        url: '/wechat/wxUser/synchron/' + appid,
        method: 'post'
    })
}